Skip to content

refactor: replace strings.Replace with strings.ReplaceAll#2075

Merged
FabianKramm merged 1 commit intodevspace-sh:masterfrom
Juneezee:refactor/strings-replaceall
May 16, 2022
Merged

refactor: replace strings.Replace with strings.ReplaceAll#2075
FabianKramm merged 1 commit intodevspace-sh:masterfrom
Juneezee:refactor/strings-replaceall

Conversation

@Juneezee
Copy link
Copy Markdown
Contributor

What issue type does this pull request address? (keep at least one, remove the others)
/kind enhancement

What does this pull request do? Which issues does it resolve? (use resolves #<issue_number> if possible)
Replace strings.Replace(s, old, new, -1) with strings.ReplaceAll(s, old, new). strings.ReplaceAll is a wrapper function for strings.Replace, but strings.ReplaceAll is more readable and removes the hardcoded -1.

Please provide a short message that should be published in the DevSpace release notes
N/A, this is a non-user facing change

What else do we need to know?

strings.ReplaceAll(s, old, new) is a wrapper function for
strings.Replace(s, old, new, -1). But strings.ReplaceAll is more
readable and removes the hardcoded -1.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 13, 2022

Deploy Preview for devspace-docs ready!

Name Link
🔨 Latest commit 9e62b9f
🔍 Latest deploy log https://app.netlify.com/sites/devspace-docs/deploys/627e815531ab86000924ad53
😎 Deploy Preview https://deploy-preview-2075--devspace-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Copy Markdown
Collaborator

@FabianKramm FabianKramm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Juneezee thanks a lot for the PR! LGTM!

@FabianKramm FabianKramm merged commit dd9129b into devspace-sh:master May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants